<template>
  <div class="direction">
    <home-header></home-header>
    <home-swiper></home-swiper>
    <home-icon></home-icon>
    <home-content></home-content>
  </div>
</template>

<script>
import HomeHeader from '@/components/Header'
import HomeSwiper from '@/components/Swiper'
import HomeIcon from '@/components/Icon'
import HomeContent from '@/components/content'
export default {
  name: 'Home',
  components: {
    HomeHeader,
    HomeSwiper,
    HomeIcon,
    HomeContent
  },
  data () {
    return {
      icon: {
        normal: '/static/images/write.png'
      }
    }
  },
  methods: {
    onChange (event) {
      console.log(event.detail)
    }
  },

  onShow () {
    this.$root.$mp.page.getTabBar().setData({
      activeIndex: 0 // 对应页面的index
    })
  }
}
</script>

<style lang="stylus" scoped>
  .direction
    display flex
    flex-direction column
</style>
